/**
 * 
 */
package com.game.jumpdino.logic.visual;

import com.game.jumpdino.logic.Playground;

/**
 * @author guhu
 *
 */
public class Blocker extends VisualBase {
	@Override
	public void onHit(VisualBase visual, Playground ground){
		super.onHit(visual, ground);
		if (visual.getVelocity().y < 0){
			ground.Fail();
		} else {
			// Make sure the panda stand above on the visual.
			visual.putOnTopOf(this);
			super.doJump(visual);
		}
	}	
}